﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using QxFramework.Core;
using System;
public class Smoke : EffectBase
{
    public override void OnDisplay(Vector3 pos, object arg = null)
    {
        base.OnDisplay(pos, arg);
        this.transform.position = pos;
        var info = arg as Tuple<float, Vector2>;
        this.transform.localScale = new Vector3(0.3f,1 ,info.Item1 / PosFixedItem.ForceToMakeSmokeThreshold * 0.3f);
    //    Debug.Log(Vector3.Angle(Vector3.zero, info.Item2));
        this.transform.localEulerAngles = new Vector3(0, 0, Mathf.Atan2(info.Item2.x,info.Item2.y)/Mathf.PI*180);
    }
    private void OnDrawGizmos()
    {
        Gizmos.DrawCube(this.transform.position, Vector3.one * 0.1f);
    }
}
